Skip to content

Conversation

@yujonglee
Copy link
Contributor

@yujonglee yujonglee commented Dec 5, 2025

Summary

Fixes the desktop-e2e-linux CI job failure by adding ts-node as a devDependency to the desktop-e2e package.

The @wdio/local-runner worker conditionally uses ts-node for ESM support via NODE_OPTIONS (see node_modules/@wdio/local-runner/build/worker.js). Without ts-node installed, the worker fails with:

Error: Cannot find package 'ts-node' imported from /home/runner/work/hyprnote/hyprnote/apps/desktop-e2e/

The ts-node version (10.9.2) matches what's already used elsewhere in the monorepo.

Review & Testing Checklist for Human

  • Verify the desktop-e2e-linux CI job passes after this change
  • Check if the "tauri-driver did not start in time" error (also seen in the failing CI run) is resolved or still occurring - this may be a separate issue that needs attention

Test plan: Trigger the desktop CD workflow and verify the build-linux job completes successfully, particularly the E2E test step.

Notes

The @wdio/local-runner worker.js conditionally uses ts-node for ESM
support via NODE_OPTIONS. Without ts-node installed, the worker fails
with 'Cannot find package ts-node' error in CI.

This fixes the desktop-e2e-linux CI job failure.

Co-Authored-By: yujonglee <[email protected]>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 707a9b9
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/693283d32768ee0008815123
😎 Deploy Preview https://deploy-preview-2129--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 707a9b9
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/693283d3fbd58200085ff1e6
😎 Deploy Preview https://deploy-preview-2129--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

📝 Walkthrough

Walkthrough

Added ts-node devDependency version 10.9.2 to the desktop-e2e package. This single dependency addition enables TypeScript node execution capability in the e2e testing environment without any other configuration or functional changes.

Changes

Cohort / File(s) Summary
Dependency Addition
apps/desktop-e2e/package.json
Added ts-node v10.9.2 as devDependency

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding ts-node dependency to fix a desktop-e2e CI job failure.
Description check ✅ Passed The description is well-detailed and directly related to the changeset, explaining the rationale, error context, and testing instructions for the ts-node dependency addition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1764917957-fix-desktop-e2e-ts-node

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f898bb and 707a9b9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • apps/desktop-e2e/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/desktop-e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:24.348Z
Learning: Applies to apps/desktop-e2e/**/*.{test,spec}.{js,ts,tsx} : Refer to `scripts/setup-desktop-e2e.sh` for end-to-end test environment setup if setup is missing
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/desktop-e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:28.547Z
Learning: Refer to `scripts/setup-desktop-e2e.sh` for setup instructions if the environment is not configured for running e2e tests
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/desktop-e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:25.263Z
Learning: Refer to `scripts/setup-desktop-e2e.sh` script if setup is missing for running the test
📚 Learning: 2025-11-24T16:32:24.348Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/desktop-e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:24.348Z
Learning: Applies to apps/desktop-e2e/**/*.{test,spec}.{js,ts,tsx} : Refer to `scripts/setup-desktop-e2e.sh` for end-to-end test environment setup if setup is missing

Applied to files:

  • apps/desktop-e2e/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: Devin
  • GitHub Check: fmt
🔇 Additional comments (2)
apps/desktop-e2e/package.json (2)

16-16: Remove ts-node or complete TypeScript migration for e2e tests.

The addition of ts-node 10.9.2 is unnecessary in its current form. Test specs are configured to run ./test/**/*.spec.js (JavaScript files), and there is no tsconfig.json, TypeScript configuration, or ts-node setup in wdio.conf.js. ts-node is a TypeScript executor and serves no purpose when only executing JavaScript.

Either:

  1. Remove ts-node from devDependencies if the tests will remain JavaScript
  2. Complete the TypeScript migration by: converting app.spec.js to app.spec.ts, updating wdio.conf.js to reference .spec.ts files, adding a tsconfig.json for the desktop-e2e workspace, and configuring ts-node in wdio.conf.js

Likely an incorrect or invalid review comment.


9-18: Remove the unused ts-node dependency or provide context for its necessity.

The ts-node package appears to be unused. The test file (app.spec.js) and configuration (wdio.conf.js) are both plain JavaScript with ES modules enabled. No TypeScript files, tsconfig.json, or ts-node configuration exist in the desktop-e2e package. The setup script (scripts/setup-desktop-e2e.sh) also makes no reference to npm dependencies. If ts-node was added to address a specific wdio worker issue, that context should be documented or the dependency should be removed to avoid confusion and unnecessary bloat.

Likely an incorrect or invalid review comment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@devin-ai-integration
Copy link
Contributor

The ts-node dependency is required by @wdio/local-runner even though the test files are JavaScript. The worker.js in @wdio/local-runner conditionally sets NODE_OPTIONS to use ts-node for ESM support:

// node_modules/@wdio/local-runner/build/worker.js
process.env.WDIO_LOAD_TS_NODE === '1' &&
    !(process.env.NODE_OPTIONS || '').includes('--loader ts-node/esm')) {
    runnerEnv.NODE_OPTIONS = (runnerEnv.NODE_OPTIONS || '') + ' --loader ts-node/esm/transpile-only --no-warnings';
    if (nodeVersion('major') >= 20 || (nodeVersion('major') === 18 && nodeVersion('minor') >= 19)) {
        runnerEnv.NODE_OPTIONS += ' -r ts-node/register';
    }
}

When this code path is triggered in CI, Node.js tries to resolve ts-node and fails with Cannot find package 'ts-node'. This is an internal WebdriverIO behavior, not something we can easily disable without forking the package.

@yujonglee yujonglee merged commit a85a87b into main Dec 5, 2025
12 of 13 checks passed
@yujonglee yujonglee deleted the devin/1764917957-fix-desktop-e2e-ts-node branch December 5, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants